' This program exported from BASIC Anywhere Machine (Version [5.2.3].[2023.08.29.21.34]) on 2023.10.01 at 16:52 (Coordinated Universal Time)
' Based on a SpecBAS program by Paul Dunn (see commented program listing at the bottom)
' Ported (with some mods) to BASIC Anywhere Machine by Charlie Veniot
_alert("At any time, click/touch the screen to start a new graph")
tau = _PI * 2
screen _newimage(400,400,12)
10 xph=rnd*tau : yph=rnd*tau : xf =int(1+rnd*150) : yf=int(1+rnd*150) : s=int(rnd*300)+10
color int(rnd*15) + 1
30 cls
for i=0 to s
w=(tau*i)/s : x=sin(xf*w+xph) * 175 : y=sin(yf*w+yph) * 175
if i then line - (x + 200,y + 200) else plot (x + 200,y + 200)
next i
40 xph+=.002 : yph+=.002
_display
IF _MOUSEBUTTON THEN WHILE _MOUSEBUTTON : WEND : GOTO 10
GOTo 30
' ⭐⭐⭐⭐⭐ Original SpecBAS program by Paul Dunn ⭐⭐⭐⭐⭐
' 10 xph,yph=rnd*tau,xf,yf=int(1+rnd*150),s=int(rnd*300)+10
' 20 paper 0: ink 7:
' m=min(scrw-10,scrh-10),mx=scrw/m,my=scrh/m:
' origin -mx,-my to mx,my
' 30 cls:
' for i=0 to s:
' w=(tau*i)/s,x=sin(xf*w+xph),y=sin(yf*w+yph):
' if i then draw to x,y else plot x,y: end if:
' next i
' 40 xph,yph+=.002:
' wait screen:
' if inkey$="" then
' GO To 30
' else
' wait keyup:
' GO To 10